package com.ethink.framework.common.exception;

/**
 * 自定义异常
 * <p>
 * 由于Business异常定义在enum中，不容易自定义修改异常
 * </p>
 *
 * @author yunduo
 */
public class DefinitionException extends RuntimeException {

    /**
     * 响应码
     */
    private final Integer code;


    /**
     * 异常信息简述
     */
    private final String message;


    public DefinitionException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
